Update last_active_at when steps are created, edited, toggled, or del…#2946
Open
Klar wants to merge 3 commits into
Open
Update last_active_at when steps are created, edited, toggled, or del…#2946Klar wants to merge 3 commits into
Klar wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures Step (checkbox) create/update/toggle/destroy activity updates a Card’s last_active_at via card.touch_last_active_at, so the entropy/auto-postponement system recognizes checkbox interactions as meaningful card activity.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Add Step model callbacks to touch the parent card’s activity timestamp on save and destroy.
- Extend the Steps controller integration tests to assert
last_active_atchanges for Turbo Stream step interactions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/controllers/cards/steps_controller_test.rb | Adds assertions that step interactions update card.last_active_at. |
| app/models/step.rb | Switches from touch: true to explicit card.touch_last_active_at on save/destroy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2-space indentation style Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2876
Step (checkbox) interactions — creating, editing text, checking/unchecking,
and deleting — now update the card's
last_active_attimestamp viacard.touch_last_active_at. Previously onlyupdated_atchanged (viabelongs_to :card, touch: true), which meant the entropy/auto-postponementsystem was blind to checkbox activity.